﻿using System;
using System.ComponentModel.DataAnnotations;

namespace DAL
{
    public class SysDepartmentMetadata
    {
        [ScaffoldColumn(false)]
        [Display(Name = "主键", Order = 1)]
        public object Id { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "名称", Order = 2)]
        [Required(ErrorMessage = "不能为空")]
        [StringLength(200, ErrorMessage = "长度不可超过200")]
        public object Name { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "父部门", Order = 3)]
        [StringLength(36, ErrorMessage = "长度不可超过36")]
        public object ParentId { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "部门地址", Order = 4)]
        [StringLength(200, ErrorMessage = "长度不可超过200")]
        public object Address { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "排序", Order = 5)]
        [Range(0, 2147483646, ErrorMessage = "数值超出范围")]
        public int? Sort { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "备注", Order = 6)]
        [StringLength(4000, ErrorMessage = "长度不可超过4000")]
        public object Remark { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "创建时间", Order = 7)]
        [DataType(DataType.DateTime, ErrorMessage = "时间格式不正确")]
        public DateTime? CreateTime { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "创建人", Order = 8)]
        [StringLength(200, ErrorMessage = "长度不可超过200")]
        public object CreatePerson { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "编辑时间", Order = 9)]
        [DataType(DataType.DateTime, ErrorMessage = "时间格式不正确")]
        public DateTime? UpdateTime { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "编辑人", Order = 10)]
        [StringLength(200, ErrorMessage = "长度不可超过200")]
        public object UpdatePerson { get; set; }
    }
}
